-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STYLE: Format code using ruff
#881
STYLE: Format code using ruff
#881
Conversation
560830b
to
ea4ccc0
Compare
The pre-commit hook is nicely doing its job: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #881 +/- ##
==========================================
- Coverage 84.43% 84.37% -0.06%
==========================================
Files 44 44
Lines 10534 10556 +22
Branches 1423 1432 +9
==========================================
+ Hits 8894 8907 +13
- Misses 1266 1270 +4
- Partials 374 379 +5
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jhlegarreta,
Thank you for this. See my comment below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @jhlegarreta,
See above my comment. In summary:
- ok for double quotes
- remove experimental from linting please
ea4ccc0
to
20e1a17
Compare
@skoudoro OK. Please, have a look at the CI result to see if the changes look OK to you, and if so, I will apply them locally and commit all files. |
20e1a17
to
40cfa2f
Compare
I just skim it. A lot is single quotes vs double quotes. Not sure I will have time now to check if there is something weird that I do not agree. So for now, I agree and if something come up, it will be updated on a new PR. |
@WassCodeur, please, see the comment above. You need to update all your PR before thursday afternoon |
sure |
c4349ff
to
1320447
Compare
Some comments
Anyways, I think the above differences can be worked in a separate PR: many of the edits in this PR were not trivial/were manual, and avoiding to go over all of them again would save time, e.g. So I'd merge this as is and rework the rest in separate PRs. @skoudoro let me know if you can afford investigating the above a bit or whether merging this is better. |
Thanks for this huge work. Not sure to understand all your request but I will go carefully through this PR. if all ok, I will go ahead and merge, then, we will fix the other issue in new PRs |
👍 One of the things that is maybe happening is that the Edit: I inadvertently closed the PR. Re-opened. |
88134f5
to
97c9096
Compare
Format the code using `ruff`: supersedes `flake8` and `blue`. `blue` was not being applied previously as the relevant `pre-commit` hook config block was commented in the. Remove the `.flake8` config file: in practice few rules were being applied as the config file contained a significant number fo ignored rules. Bump `ruff-pre-commit` pre-commit hook version to v0.4.3 (May 3, 2024): the version being used previously was v0.1.7 was from Dec 4, 2023. Made changes consistent between changes being observed locally vs on the GitHub action. Sort the imports according to the new version: new sorting is dictated by the default value of `force-sort-within-sections` (`false`): imports are sorted by module. Fix the warnings reported by `ruff`, e.g. C408, F401, etc.
97c9096
to
65a12d6
Compare
OK, got this working: the issue was that there is a And here fixes have been applied. Sorry (esp @skoudoro) for all the noise generated by the push forces and the previous misleading comments. This is ready to be merged (IMHO, the Ubuntu Python 3.9 failure is unrelated). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you @jhlegarreta,
merging
Format the code using
ruff
: supersedesflake8
andblue
.blue
was not being applied previously as the relevantpre-commit
hook config block was commented in the.Remove the
.flake8
config file: in practice few rules were being applied as the config file contained a significant number fo ignored rules.Bump
ruff-pre-commit
pre-commit hook version to v0.4.3 (May 3, 2024): the version being used previously was v0.1.7 was from Dec 4, 2023. Made changes consistent between changes being observed locally vs on the GitHub action.Sort the imports according to the new version: new sorting is dictated by the default value of
force-sort-within-sections
(false
): imports are sorted by module.